Making fossil push work with larger files
Recently I've been using Fossil SCM to manage code. But I ran into an issue: if a repo has a large(ish) file in it, fossil push can fail to push the changes to a remote repository. This is really annoying because the failure is totally silent - it doesn't give any hint as to what's gone wrong.
The file does not need to be very big in fact. In the repo for this website, a file of 69kb triggered this. Before adding the file - fossil push worked fine. After adding it - fossil push silently failed. No error message, and the last thing printed was 'Waiting for serve...'. (I did however notice a .fossil-journal was leftover next to the .fossil repository file.)
If you run into this, a possible solution is to reduce the value of the max-upload parameter, which sets a "limit on the size of uplink HTTP requests". This can be done in the fossil ui settings page or via fossil settings. I set it to 10kb instead of the default 250kb and fossil push miraculously worked.
Why it might work. my hunch is that the size of the upload also determines how much memory the server copy of fossil uses (the copy running as a cgi-bin as described here). If the memory is too high, the webserver kills it. This depends on the server so is probably limited to particular hosts. I've seen the issue in Fossil version 2.16 and the snapshot from 2021-09-13.